package com.athuahua.spzx.service.impl;

import com.athuahua.spzx.entity.vo.CategoryBrandVo;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.athuahua.spzx.entity.ProductSpec;
import com.athuahua.spzx.service.ProductSpecService;
import com.athuahua.spzx.mapper.ProductSpecMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

/**
* @author huahua
* @description 针对表【product_spec(商品规格)】的数据库操作Service实现
* @createDate 2024-07-31 15:28:28
*/
@Service
public class ProductSpecServiceImpl extends ServiceImpl<ProductSpecMapper, ProductSpec>
    implements ProductSpecService{


    @Resource
    private ProductSpecMapper productSpecMapper;
    @Override
    public IPage<ProductSpec> pageInfo(Integer page, Integer limit) {
        IPage<ProductSpec> iPage = new Page<>(
                page,
                limit
        );
        return productSpecMapper.selectPage(iPage, new LambdaQueryWrapper<ProductSpec>().orderByDesc(ProductSpec::getUpdateTime));
    }
}




